create database  TestDB

on

(

	name='TestDB',

	filename='D:\TestDB.mdf',

	size=10,

	maxsize=100,

	filegrowth=10

)

log on

(

	name='TestDB_log',

	filename='D:\TestDB_log.ldf',

	size=10,

	maxsize=100,

	filegrowth=10

)
go

use   TestDB

go
create table  typeInfo
( 

     typeId int  primary key,

     typeName varchar(10) not null unique,



)
 create table loginInfo
 (
     LoginId int  primary key,
	 LoginName varchar(10) not null unique,
	 LoginPwd varchar(20) not null default('123456'),
	 StuSex    nvarchar(1) default('') check(StuSex='男' or StuSex='女' )  not null,
	 shengrr int ,
	 huiyuanleibie int
 )